#include "mainwindow.h"

#include <QtGui/QApplication>
#include <QSqlDatabase>
#include <QDebug>
#include <QDeclarativeView>
#include <QDeclarativeContext>

#include "qmlapplicationviewer.h"
#include "sql/database.h"
#include "clientsql.h"

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

//    MainWindow mainWindow;
//    mainWindow.setOrientation(MainWindow::ScreenOrientationAuto);
//    mainWindow.showExpanded();
//    ClientSql client;
  //  client.show();

    QmlApplicationViewer viewer;
    QDeclarativeContext *ctxt = viewer.rootContext();
    ctxt->setContextProperty("qmViewer",&viewer);
    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
    viewer.setMainQmlFile(QLatin1String("qml/qml/search_apartment.qml"));
    viewer.show();

    return app.exec();
}
